//
//  LCComposeTopView.swift
//  JKBiblicalReading
//
//  Created by admin on 2018/8/17.
//  Copyright © 2018年 LC. All rights reserved.
//

import UIKit

class LCComposeTopView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //FIXME:- 上午10:29 设置视图
    ///设置视图
    private func setupUI(){
        addSubview(placeholderLabel)
        placeholderLabel.snp.makeConstraints { (make) in
            make.left.equalTo(15)
            make.top.equalTo(18)
            make.right.equalTo(-15)
//            make.width.equalTo(ScreenWidth - 15 * 2)
        }
        addSubview(titleLabel)
        titleLabel.textAlignment = .right;
        titleLabel.snp.makeConstraints { (make) in
            make.top.equalTo(placeholderLabel.snp.bottom).offset(20)
            make.right.equalTo(placeholderLabel.snp.right)
            make.left.equalTo(placeholderLabel.snp.left)
        }
    }
    lazy var placeholderLabel: UILabel = {
        let lab = UILabel()
        self.setupPlaceholderLabel(lab)
        return lab
    }()
    lazy var titleLabel: UILabel = {
        let lab = UILabel()
        self.setupPlaceholderLabel(lab)
        return lab
    }()
}
extension LCComposeTopView {
    fileprivate func setupPlaceholderLabel(_ lab : UILabel){
        lab.font = UIFont(name: "Helvetica-Bold", size: 19)
        lab.textColor = UIColor.black
        lab.numberOfLines = 0
    }
}
